package com.atguigu.gmall.feign.seckill;

import com.atguigu.gmall.model.activity.SeckillGoods;
import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author lsj
 * @create 2021-09-02 11:35
 */
@RequestMapping("/api/seckill")
@FeignClient("service-seckill")
public interface SeckillFeignClient {

    @GetMapping("/current/goods")
    public List<SeckillGoods> getCurrentSeckillGoods();

    @GetMapping("/goods/{skuId}")
    public SeckillGoods getSeckillGoodsDetail(@PathVariable("skuId") Long skuId);

    @GetMapping("/auth/user/seckillorder")
    public OrderInfo getUserSeckillOrderInfo();
}
